<template>
	<view>
		<view style="width: 100%; height: 20rpx;background: #f6f6f6;"></view>
		<view class="row-css" style="margin: 30rpx; align-items: center;text-align: center;justify-content: center;">
			<image style="width: 115rpx;height: 115rpx;border-radius: 50%;overflow:hidden;" src="../../static/icon_ecco.png"></image>
			<view style="font-size: 36rpx;margin-left: 20rpx;">绑卡成功</view>
		</view>
		<view class="column-css" style="padding: 20rpx 0;">
			<view class="row-css view-centent">
				<view style="width: 180rpx;">姓名</view>
				<view>{{ personName }}</view>
			</view>
			<view class="row-css view-centent">
				<view style="width: 180rpx;">卡号</view>
				<view>{{ bankNo }}</view>
			</view>
			<view class="row-css view-centent">
				<view style="width: 180rpx;">开户银行</view>
				<view>{{ bankName }}</view>
			</view>
		</view>
		<view class="row-css" style="width: 90%;margin: 60rpx 40rpx;">
			<button class="mini-btn" style="background: #FB8536;" type="primary" size="default" @click="onback()">返回钱包</button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			personName: '',
			bankNo: '',
			bankName: ''
		};
	},
	methods: {
		onback() {
			uni.navigateBack({
				delta: 1
			});
		}
	},
	onLoad: function(options) {
		if (uni.getStorageSync('loginType') == '2') {
			this.personName = uni.getStorageSync(this.DATA_KEY.userInfo).captainName
		} else {
			this.personName = uni.getStorageSync(this.DATA_KEY.userInfo).driverName;
		}
		this.bankNo = options.bankNo;
		this.bankName = options.bankName;
	},
	onUnload() {
		console.log('监听返回按钮事件');
		uni.navigateBack({
			delta: 1
		});
		// this.onback();
	}
};
</script>

<style>
page {
	background: #ffffff;
	font-size: 30rpx;
}

.row-css {
	display: flex;
	flex-direction: row;
}

.column-css {
	display: flex;
	flex-direction: column;
}

.view-centent {
	padding: 20rpx 10rpx;
	flex: 1;
	margin: 0 30rpx;
}
.mini-btn {
	width: 100%;
	background: #e04b28;
	font-size: 28rpx;
	padding: 10rpx 0;
	margin: 0 20rpx;
}
</style>
